<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%@ include file="/WEB-INF/include/common/common-header.jspf"%>
		<%@ include file="/WEB-INF/include/admin/common-admin-header.jspf"%>
		<title>${siteName} - 后台首页</title>
	</head>
	<body class="layui-layout-body">
		<div id="site-wrapper">
			<div class="layui-layout layui-layout-admin">
				<!-- 头部区域 -->
				<div class="layui-header">
					<ul class="layui-nav layui-layout-left">
						<li class="layui-nav-item layadmin-flexible" lay-unselect="">
							<a href="javascript:;" id="flexibleBtn" title="侧边伸缩"> 
								<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
							</a>
						</li>
						<li class="layui-nav-item layui-hide-xs" lay-unselect="">
							<a href="#" target="_blank" title="前台">
								<i class="layui-icon layui-icon-website"></i>
							</a>
						</li>
						<li class="layui-nav-item" lay-unselect="">
							<a href="javascript:;" layadmin-event="refresh" title="刷新"> 
								<i class="layui-icon layui-icon-refresh-3"></i>
							</a>
						</li>
						<li class="layui-nav-item layui-hide-xs" lay-unselect="">
							<input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords=">
						</li>
					</ul>
					<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
						<li class="layui-nav-item" lay-unselect="">
							<a data-href="app/message/index.html" layadmin-event="message" lay-text="消息中心"> 
								<i class="layui-icon layui-icon-notice"></i> <!-- 如果有新消息，则显示小圆点 -->
								<span class="layui-badge-dot"></span>
							</a>
						</li>
						<li class="layui-nav-item layui-hide-xs" lay-unselect="">
							<a href="javascript:;" layadmin-event="fullscreen"> 
								<i class="layui-icon layui-icon-screen-full"></i>
							</a>
						</li>
						<li class="layui-nav-item" lay-unselect="" style="margin-right: 20px">
							<a href="javascript:;"> <cite>${user.username}</cite> <span class="layui-nav-more"></span></a>
							<dl class="layui-nav-child">
								<dd>
									<a href="javascript:;" class="jump-to-iframe" data-id="user_base_info" data-href="${ctx}/admin/sys/user/detail/${user.id}.html">基本资料</a>
								</dd>
								<dd>
									<a href="javascript:;" class="jump-to-iframe" data-id="user_modify_password" data-href="${ctx}/admin/sys/user/password.html">修改密码</a>
								</dd>
								<hr>
								<dd layadmin-event="logout" style="text-align: center;">
									<a href="${ctx}/admin/sys/user/logout.html">退出</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			
				<!-- 左侧菜单 -->
				<div class="layui-side layui-side-menu">
					<div class="layui-side-scroll">
						<div class="layui-logo" data-href="home/console.html">
							<span>${siteName}</span>
						</div>
			
						<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
							<c:forEach items="${menuList}" var="menu">
								<li data-name="${menu.menuCode}" class="layui-nav-item">
									<c:if test="${fn:length(menu.childList) == 0 }">
										<a href="javascript:;" class="jump-to-iframe" data-id="${menu.menuCode}" data-href="${ctx}${menu.menuUrl}" lay-tips="${menu.menuName}" lay-direction="2"> 
											<i class="layui-icon ${menu.menuIcon}"></i> 
											<cite>${menu.menuName}</cite> 
										</a>
									</c:if>
									<c:if test="${fn:length(menu.childList) != 0 }">
										<a href="javascript:;" data-id="${menu.menuCode}" lay-tips="${menu.menuName}" lay-direction="2"> 
											<i class="layui-icon ${menu.menuIcon}"></i> 
											<cite>${menu.menuName}</cite> 
											<span class="layui-nav-more"></span>
										</a>
										<dl class="layui-nav-child">
											<c:forEach items="${menu.childList}" var="son">
												<dd data-name="${son.menuCode}">
													<c:if test="${fn:length(son.childList) == 0 }">
														<a href="javascript:;" class="jump-to-iframe" data-id="${son.menuCode}" data-href="${ctx}${son.menuUrl}">${son.menuName}</a>
													</c:if>
													<c:if test="${fn:length(son.childList) != 0 }">
														<a href="javascript:;" data-id="${menu.menuCode}">${son.menuName}<span class="layui-nav-more"></span></a>
														<dl class="layui-nav-child">
															<c:forEach items="${son.childList}" var="gSon">
																<dd>
																	<a href="javascript:;" data-id="${gSon.menuCode}" class="jump-to-iframe" data-href="${ctx}${gSon.menuUrl}">${gSon.menuName}</a>
																</dd>
															</c:forEach>
														</dl>
													</c:if>
												</dd>
											</c:forEach>
										</dl>
									</c:if>
								</li>
							</c:forEach>
						</ul>
					</div>
				</div>
			
				<!-- tab标签切换 -->
				<div class="layadmin-pagetabs" id="LAY_app_tabs">
					<div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
					<div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
					<div class="layui-icon layadmin-tabs-control layui-icon-down">
						<ul class="layui-nav layadmin-tabs-select"
							lay-filter="layadmin-pagetabs-nav">
							<li class="layui-nav-item" lay-unselect="">
								<a href="javascript:;"><span class="layui-nav-more"></span></a>
								<dl class="layui-nav-child layui-anim-fadein layui-anim layui-anim-upbit">
									<dd layadmin-event="closeThisTabs">
										<a href="javascript:;">关闭当前标签页</a>
									</dd>
									<dd layadmin-event="closeOtherTabs">
										<a href="javascript:;">关闭其它标签页</a>
									</dd>
									<dd layadmin-event="closeAllTabs">
										<a href="javascript:;">关闭全部标签页</a>
									</dd>
								</dl>
							</li>
						</ul>
					</div>
					<div class="layui-tab" lay-unauto="" lay-allowclose="true" lay-filter="layadmin-layout-tabs">
						<ul class="layui-tab-title" id="site-tab">
							<li data-id="tab_homepage" data-href="home/console.html" class="layui-this">
								<i class="layui-icon layui-icon-home"></i>
								<i class="layui-icon layui-unselect layui-tab-close">ဆ</i>
							</li>
						</ul>
					</div>
				</div>
				
				<!-- 内容 -->
				<div class="layui-body" id="site-content-body">
					<div class="layadmin-tabsbody-item layui-show" data-id="iframe_homepage">
						<iframe src="${ctx}/admin/welcome.html" frameborder="0" class="layadmin-iframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		
		<%@ include file="/WEB-INF/include/common/common-footer.jspf"%>
		<%@ include file="/WEB-INF/include/admin/common-admin-footer.jspf"%>
		<script>
		//注意：折叠面板 依赖 element 模块，否则无法进行功能性操作
		layui.use('element', function(){
		  var element = layui.element;
		  
		  //…
		});
		</script>
		<script src="${ctx}/js/admin/lay-control.js?r=<%=Math.random()%>"></script>
	</body>
</html>